fix(routing): honor edited custom-node API type - #12358
Merged
diegosouzapw merged 5 commits intoSep 11, 2026
Merged
diegosouzapw merged 5 commits into
diegosouzapw merged 5 commits into
Conversation
The regression is covered at the sink: an integration test drives handleChat through the real PUT /api/provider-nodes/[id] edit and asserts the captured upstream request uses the edited Chat Completions shape. Closes diegosouzapw#11884 Co-authored-by: Leon Marcos <leonaniagomez@gmail.com>
…osouzapw#12358 Co-authored-by: Leon Marcos <leonaniagomez@gmail.com>
pacocartones
added a commit
to pacocartones/OmniRoute
that referenced
this pull request
Sep 1, 2026
pacocartones
force-pushed
the
fix/11884-custom-node-api-type-pc
branch
from
September 1, 2026 23:26
6a681a3 to
5df0c34
Compare
Co-authored-by: Leon Marcos <leonaniagomez@gmail.com>
…iegosouzapw#11884 case One new end-to-end case, +88 lines. Irreducible at this layer: the point of the test is the full route-to-upstream path, which is what diegosouzapw#11884 regressed.
diegosouzapw
merged commit Sep 11, 2026
7cd2fab
into
diegosouzapw:release/v3.8.51
8 of 16 checks passed
Githab-capibara
added a commit
to Githab-capibara/OmniRoute
that referenced
this pull request
Sep 17, 2026
Forwarding only an explicit custom-model DB override as `modelInfo.targetFormat` is the key distinction — it lets chat core's credential-aware resolution pick the live connection setting instead of the format baked into the node id at creation, which is exactly what diegosouzapw#11884 was about. I rebaselined the integration test file for the new case. --- Validated in one consolidated worktree cut from `release/v3.8.51`, boarded with the rest of this batch — zero conflicts between the 19 PRs. - `typecheck:core` clean; `check:dashboard-typecheck` OK (206 pre-existing, all within the frozen baseline); `check:changelog-integrity` OK - complexity 2802 / baseline 3218 and cognitive-complexity 1267 / baseline 1437 — both under baseline - 226 of 228 focused assertions green across the batch's 23 test files. The 2 remaining belong to diegosouzapw#12551, which is held separately. Two batch-owned defects were found and fixed in flight, both pure base drift: `173_xp_action_counts.sql` collided with `173_call_logs_video_content_removed.sql` (renumbered to 176 on diegosouzapw#12651 — it aborted every DB open, which is what 53 of the first run's failures were), and the feature-flag catalog was missing the `SERVER_OWNED_TOOL_LOOP_ENABLED` row the base gained after diegosouzapw#12552 was written.⚠️ base-red inherited: diegosouzapw#12732 — `Docs Gates`, `Merge integrity`, `No new ESLint warnings`, `Unit Tests fast-path` and `Fast Quality Gates` reproduce on the pure tip (provider count 356 vs the 358 the modules define, SKILL.md drift, and `open-sse/utils/stream.ts` at 3115 > frozen 3098, which this batch does not touch). Thanks @pacocartones — the `file:line` citations and the explicit out-of-scope notes on every one of these made a 19-PR batch reviewable in one pass.
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
Forwarding only an explicit custom-model DB override as `modelInfo.targetFormat` is the key distinction — it lets chat core's credential-aware resolution pick the live connection setting instead of the format baked into the node id at creation, which is exactly what diegosouzapw#11884 was about. I rebaselined the integration test file for the new case. --- Validated in one consolidated worktree cut from `release/v3.8.51`, boarded with the rest of this batch — zero conflicts between the 19 PRs. - `typecheck:core` clean; `check:dashboard-typecheck` OK (206 pre-existing, all within the frozen baseline); `check:changelog-integrity` OK - complexity 2802 / baseline 3218 and cognitive-complexity 1267 / baseline 1437 — both under baseline - 226 of 228 focused assertions green across the batch's 23 test files. The 2 remaining belong to diegosouzapw#12551, which is held separately. Two batch-owned defects were found and fixed in flight, both pure base drift: `173_xp_action_counts.sql` collided with `173_call_logs_video_content_removed.sql` (renumbered to 176 on diegosouzapw#12651 — it aborted every DB open, which is what 53 of the first run's failures were), and the feature-flag catalog was missing the `SERVER_OWNED_TOOL_LOOP_ENABLED` row the base gained after diegosouzapw#12552 was written.⚠️ base-red inherited: diegosouzapw#12732 — `Docs Gates`, `Merge integrity`, `No new ESLint warnings`, `Unit Tests fast-path` and `Fast Quality Gates` reproduce on the pure tip (provider count 356 vs the 358 the modules define, SKILL.md drift, and `open-sse/utils/stream.ts` at 3115 > frozen 3098, which this batch does not touch). Thanks @pacocartones — the `file:line` citations and the explicit out-of-scope notes on every one of these made a 19-PR batch reviewable in one pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
modelInfo.targetFormat, so chat core's credential-aware resolution picks the live connection setting instead of the format baked into the node id at creation.Related Issues
Validation
tests/integration/chat-pipeline.test.ts(#11884 chat pipeline sends a custom node's edited Chat API type upstream) 1/1,tests/unit/chat-helpers.test.ts28/28,npm run typecheck:coreexit 0, focused ESLint exit 0,git diff --checkclean,check:changelog-integrityOKnpm run lint— exit 0 with--pass-on-unpruned-suppressions; the literal command exits 2 only because the merged base leaves unused global suppressions (eslint 10), no rule violation reportedrelease/v3.8.51@158647618; focused checks rerun afterwardRegression proof at the sink: with the
src/sse/handlers/chat.tsforwarding hunks reverted, the new integration test fails (the saved Chat API type must produce a Chat Completions body, the upstream body is Responses-shaped); with the fix restored it passes.Pre-existing, unrelated: three other cases in
tests/integration/chat-pipeline.test.tsfail identically on the untouched base with upstream410 "Model claude/claude-3-5-sonnet-20241022 was shut down"/502.Tests Added Or Updated
tests/integration/chat-pipeline.test.ts— creates a custom node whose id still encodes the Responses type, edits it to Chat through the realPUT /api/provider-nodes/[id]handler, driveshandleChatwith a strictglobalThis.fetchdouble and asserts the captured upstream call isPOST {baseUrl}/chat/completionswith amessagesbody and noinput.tests/unit/chat-helpers.test.ts—#11884 configured Chat API type wins after custom-node model resolutionpins the resolver-levelcustomModelTargetFormatcontract.Coverage Notes
src/sse/handlers/chat.tsandsrc/sse/handlers/chatHelpers.tsare exercised by both tests above; the integration test covers the full request path through the fetch sink.Reviewer Notes